/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

import java.util.Date;

public class ContractEventInfo extends BaseEntity {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.id
     *
     * @mbg.generated
     */
    private String id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.contract_addr
     *
     * @mbg.generated
     */
    private String contractAddr;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.event_hash
     *
     * @mbg.generated
     */
    private String eventHash;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.event_name
     *
     * @mbg.generated
     */
    private String eventName;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.create_timestamp
     *
     * @mbg.generated
     */
    private Date createTimestamp;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column contract_event_info.event_abi
     *
     * @mbg.generated
     */
    private String eventAbi;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.id
     *
     * @return the value of contract_event_info.id
     *
     * @mbg.generated
     */
    public String getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.id
     *
     * @param id the value for contract_event_info.id
     *
     * @mbg.generated
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.contract_addr
     *
     * @return the value of contract_event_info.contract_addr
     *
     * @mbg.generated
     */
    public String getContractAddr() {
        return contractAddr;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.contract_addr
     *
     * @param contractAddr the value for contract_event_info.contract_addr
     *
     * @mbg.generated
     */
    public void setContractAddr(String contractAddr) {
        this.contractAddr = contractAddr == null ? null : contractAddr.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.event_hash
     *
     * @return the value of contract_event_info.event_hash
     *
     * @mbg.generated
     */
    public String getEventHash() {
        return eventHash;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.event_hash
     *
     * @param eventHash the value for contract_event_info.event_hash
     *
     * @mbg.generated
     */
    public void setEventHash(String eventHash) {
        this.eventHash = eventHash == null ? null : eventHash.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.event_name
     *
     * @return the value of contract_event_info.event_name
     *
     * @mbg.generated
     */
    public String getEventName() {
        return eventName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.event_name
     *
     * @param eventName the value for contract_event_info.event_name
     *
     * @mbg.generated
     */
    public void setEventName(String eventName) {
        this.eventName = eventName == null ? null : eventName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.create_timestamp
     *
     * @return the value of contract_event_info.create_timestamp
     *
     * @mbg.generated
     */
    public Date getCreateTimestamp() {
        return createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.create_timestamp
     *
     * @param createTimestamp the value for contract_event_info.create_timestamp
     *
     * @mbg.generated
     */
    public void setCreateTimestamp(Date createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column contract_event_info.event_abi
     *
     * @return the value of contract_event_info.event_abi
     *
     * @mbg.generated
     */
    public String getEventAbi() {
        return eventAbi;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column contract_event_info.event_abi
     *
     * @param eventAbi the value for contract_event_info.event_abi
     *
     * @mbg.generated
     */
    public void setEventAbi(String eventAbi) {
        this.eventAbi = eventAbi == null ? null : eventAbi.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table contract_event_info
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ContractEventInfo other = (ContractEventInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getContractAddr() == null ? other.getContractAddr() == null : this.getContractAddr().equals(other.getContractAddr()))
            && (this.getEventHash() == null ? other.getEventHash() == null : this.getEventHash().equals(other.getEventHash()))
            && (this.getEventName() == null ? other.getEventName() == null : this.getEventName().equals(other.getEventName()))
            && (this.getCreateTimestamp() == null ? other.getCreateTimestamp() == null : this.getCreateTimestamp().equals(other.getCreateTimestamp()))
            && (this.getEventAbi() == null ? other.getEventAbi() == null : this.getEventAbi().equals(other.getEventAbi()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table contract_event_info
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getContractAddr() == null) ? 0 : getContractAddr().hashCode());
        result = prime * result + ((getEventHash() == null) ? 0 : getEventHash().hashCode());
        result = prime * result + ((getEventName() == null) ? 0 : getEventName().hashCode());
        result = prime * result + ((getCreateTimestamp() == null) ? 0 : getCreateTimestamp().hashCode());
        result = prime * result + ((getEventAbi() == null) ? 0 : getEventAbi().hashCode());
        return result;
    }
}